package com.deruan.hotcore.version;

import org.columba.core.config.DefaultConfigDirectory;

public class VersionModel 
{
	private String dir = DefaultConfigDirectory.getInstance().getCurrentPath().toString();

	private String fileName;
	
	private String fileType;
	
	private Integer version;

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getFilePath() 
	{
		String filepath = "";
		if(fileType.equals("N"))
			filepath = "/mail/"+fileName;
		else if(fileType.equals("R"))
			filepath = "/addressbook/resource/"+fileName;
		else if(fileType.equals("C"))
			filepath = "/addressbook/101/"+fileName;
		else if (fileType.equals("M"))
			filepath = "/mail/"+fileName;
		
		return dir + filepath+".xml";
	}
	
	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	public String getFileType() {
		return fileType;
	}

	public void setFileType(String fileType) {
		this.fileType = fileType;
	}
	
	
}
